<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>广告位</title>
    <link href="../../style/css/back/style.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
    </style>
    <script src="../../style/js/jquery-1.8.3.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        $(function () {
            $.get("../../webmsg/webmsg", function (res) {
                if (res.code === 500) {
                    alert(res.msg)
                } else if (res.code === 202) {
                    alert("登录失效")
                } else {
                    console.log(res.data)
                    var str = "";

                        str += "<tr align='center'>";
                        str += "<td>" + (1) + "</td>";
                        str += "<td>" + res.data.webName + "</td>";
                        str += "<td>" + res.data.companyName + "</td>";
                    str += "<td>"
                    str+="<img src='" + "http://127.0.0.1:8080/tomorrowNewsFiles/logo/" + res.data.logoName + "' width='200' height='90'/>"
                    str+="</td>";
                    str += "<td>" + res.data.phone + "</td>";
                        str += "<td>" + res.data.recordNum + "</td>";
                    str += "<td>" + res.data.account + "</td>";
                        str += "<td>" + (new Date(res.data.operateTime)).toLocaleString() + "</td>";
                        str += "<td>"
                         str+="<a onclick='updateNews(" + res.data.id + ")' href='javaScript:void(0)'>修改</a>"

                    $("#newsTable").append(str)
                }
            })
        })

        function updateNews(id){
            location.assign("update.html?id="+id);
        }

    </script>
</head>

<body>
<div class="rightinfo">
    <!-- 顶部按钮 -->
    <div class="tools">
        <ul class="toolbar">

        </ul>
    </div>
    <!--数据列表 -->
    <table class="tablelist" id="newsTable">
        <tr>
            <th>序号<i class="sort"><img src="../../style/img/back/px.gif"/></i></th>
            <th>标题</th>
            <th>公司名</th>
            <th>公司logo</th>
            <th>电话</th>
            <th>备案号</th>
            <th>操作人</th>
            <th>操作时间</th>
            <th>操作</th>
        </tr>
    </table>
</div>
</body>
</html>
